From: "Kai Hofmann" 
Date: Sun, 10 Dec 1995 15:49:40 +0100
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Mailer: IntuiNews 1.2b (31.7.94)
Subject: MUIMaster.library/MUI_Fault()
Message-Id: <60804528@informatik.uni-bremen.de>
Organization: Privat Amiga site
Resent-Message-Id: <"Zdy8z.0.vq1.w2nom"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/35
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 83
Status: RO
Content-Type: text/plain; charset="iso-8859-1"
Content-Length: 3351

I think in the muimaster.library there is missing a MUI_Fault() function -
here is my implementaion of it (currently *without* locale.library support):


 LONG MUI_Fault(LONG code, STRPTR header, STRPTR buffer, LONG len)
  {
   LONG headerlen;
   static char errstr[][22] = {"OK",
                               "Out Of Memory",
                               "Out Of Gfx Memory",
                               "Invalid Window Object",
                               "Missing Library",
                               "No ARexx",
                               "Single Task"
                              };

   headerlen = strlen(header);
   if (headerlen > 0)
    {
     headerlen += 2;
    }
   buffer[0] = '\0';
   switch (code)
    {/* could be optimizied ! */
     case MUIE_OK                  : if (len >= 3+headerlen)
                                      {
                                       strcpy(buffer,errstr[0]);
                                      }
                                     break;
     case MUIE_OutOfMemory         : if (len >= 12+headerlen)
                                      {
                                       strcpy(buffer,errstr[1]);
                                      }
                                     break;
     case MUIE_OutOfGfxMemory      : if (len >= 15+headerlen)
                                      {
                                       strcpy(buffer,errstr[2]);
                                      }
                                     break;
     case MUIE_InvalidWindowObject : if (len >= 20+headerlen)
                                      {
                                       strcpy(buffer,errstr[3]);
                                      }
                                     break;
     case MUIE_MissingLibrary      : if (len >= 15+headerlen)
                                      {
                                       strcpy(buffer,errstr[4]);
                                      }
                                     break;
     case MUIE_NoARexx             : if (len >= 8+headerlen)
                                      {
                                       strcpy(buffer,errstr[5]);
                                      }
                                     break;
     case MUIE_SingleTask          : if (len >= 11+headerlen)
                                      {
                                       strcpy(buffer,errstr[6]);
                                      }
                                     break;
     default                       : return(Fault(code,header,buffer,len));
    }
   if ((header != NULL) && (strlen(buffer) > 0))
    {
     strins(buffer,": ");   /* SAS-C !! */
     strins(buffer,header);
    }
   return((LONG)strlen(buffer));
  }


From: "Kai Hofmann" 
Date: Sun, 10 Dec 1995 15:45:17 +0100
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Mailer: IntuiNews 1.2b (31.7.94)
Subject: MUIMaster.library/MUI_RequestA
Message-Id: <60804527@informatik.uni-bremen.de>
Organization: Privat Amiga site
Resent-Message-Id: <"LUlt21.0.bq1.u2nom"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/34
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 59
Status: RO
Content-Type: text/plain; charset="iso-8859-1"
Content-Length: 1937

muimaster.library/MUI_RequestA                 muimaster.library/MUI_RequestA

   NAME
        MUI_RequestA  -- Pop up a MUI requester.

   RESULT
        0, 1, ..., N = Successive id values, for the gadgets
        you specify for the requester.  NOTE: The numbering
        from left to right is actually: 1, 2, ..., N, 0.
        In case of a problem (e.g. out of memory), the
        function returns FALSE.
                         -----

FALSE == 0 - or am I wrong?


So a perfect MUI requester handling should look like this:

status = MUI_RequestA(App,NULL,0,"Title","*_Abort|_Quit",
                      "Do you really want to leave?",NULL);
switch (status)
 {
  case 0 : ioerr = IoErr();
           if (ioerr != MUIE_OK)
            {
             /* error handling */
            }
           else
            {
             /* Quit button */
            }
           break;
  case 1 : /* Abort button */
           break;
 }

(Strange!)

But this won't work, because MUI_RequestA will *NOT* make an SetIoErr()!!!
(I think so, because I always get back an 'Object not found' from IoErr())

Stefan - how about fixing this, because there could no correct error handling
of low memory (and something other strange) situations for MUI_RequestA!

To SetIoErr() will be backward compatible to older versions of MUIMaster.lib,
but I would preffer not longer to use 0 as return value for a button!

-------------------------------------------------------------------
Kai Hofmann             EMail: i07m@zfn.uni-bremen.de
FB 3, Informatik               i07m@informatik.uni-bremen.de
Universit�t Bremen      WWW  : http://www.informatik.uni-bremen.de/~i07m
                        IRC  : PowerStat
-------------------------------------------------------------------

From: "Stefan Stuntz" 
Date:   Thu, 07 Dec 1995 21:14:30 +0100
X-Mailer: IntuiNews 1.3b Beta 3 (5.11.95)
Subject: Re: Custom class in simple refresh window. How to clip?
Message-Id: <64540058@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-Id: <"XVHq6.0._h.x_7pm"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/44
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 1099
X-Lines: 64
Status: RO

Boris Folgmann wrote

> My Editorgadget is quite similar to the MUI-Listivew, so how should I do
> the ScrollRaster()? Please explain.


static VOID ScrollLines(struct IClass *cl,Object *obj,int sc)
{
        struct Data *data = INST_DATA(cl,obj);

        if (sc<0)
        {
                if (-sc0)
        {
                if (scFlags & WFLG_SIMPLE_REFRESH)
                {
                        UBYTE oldmask = _rp(obj)->Mask;

                        SetWrMsk(_rp(obj),0);
                        ScrollRaster(_rp(obj),0,sc,lleft,ltop,lleft+lwidth-1,ltop+lheight-1);
                        SetWrMsk(_rp(obj),oldmask);

                        CheckRefreshRedraw(cl,obj);
                }
        }
}


static VOID CheckRefreshRedraw(struct IClass *cl,Object *obj)
{
        if (MUI_BeginRefresh(muiRenderInfo(obj),0))
        {
                Object *o = obj;

                while (_parent(o)) /* MUIA_Parent */
                        o = _parent(o);

                MUI_Redraw(o,MADF_DRAWALL);

                MUI_EndRefresh(muiRenderInfo(obj),0);
        }
}


--
Greetings, Stefan

From: "Gilles.MASSON" 
Message-Id: <199604221032.MAA20513@alto.unice.fr>
X-Authentication-Warning: alto.unice.fr: Host localhost [127.0.0.1] didn't use HELO protocol
X-Mailer: exmh version 1.6.5 12/11/95
To: mui@sunsite.Informatik.RWTH-Aachen.DE
Subject: Calling a Hook (with gcc) / ADocReader0.2
In-Reply-To: Your message of "Tue, 16 Apr 96 12:08:57 BST."
             <81321169@magic.informatik.tu-muenchen.de> 
Mime-Version: 1.0
Date: Mon, 22 Apr 96 12:32:25 +0200
X-Mts: smtp
Resent-Message-Id: <"VyzNL1.0.pZ4.r0sUn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/1131
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
X-Lines: 13
Status: RO
Content-Type: text/plain; charset="us-ascii"
Content-Length: 277


How must i make a call to a hook function from my custom
class, with gcc, and with other than gcc to make it easier to
compile for others ?


For interested people, i've put a new release of my ADocReader
MUI Auto Doc Reader
Gilles MASSON